﻿using Tszy.Unlimited.Base.BackgroundTasks;
using Tszy.Unlimited.Data.FreeSQL;

namespace Tszy.Workers.Workers;

public class TestWorker2 : ScopedBackgroundServiceBase
{
    private readonly FreeSqlDbContext _context;

    public TestWorker2(FreeSqlDbContext context)
    {
        _context = context;
    }

    public override int DelayTime { get; set; } = 2000;

    protected override async Task OnDoWorkAsync(CancellationToken stoppingToken)
    {
        Console.WriteLine($"{Name}[{_context.UniqueId}] working!");
        await Task.CompletedTask;
    }
}